<template>
  <div class="top">
    <div class="left">
      <div class="code">今日阴转大雨，17℃ - 28℃ ⛅</div>
      <div class="lbtn" @click="goback">退出</div>
    </div>
    <div class="content">
      <div class="title">碎冰冰数据大屏展示</div>
    </div>
    <div class="right">
      <div class="rbtn" @click="">统计报告</div>
      <div class="time">当前时间为:{{ datatime }}</div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue';
import { useRouter } from 'vue-router';
const router=useRouter()
const goback = () => {
      router.push({path:'/'})
}

const datatime = ref()
const year = new Date().getFullYear()
const month = new Date().getMonth() + 1
const day = new Date().getDay()
datatime.value = (`${year}/0${month}/0${day}`)

</script>

<style lang="scss" scoped>
@mixin extendcss {
  height: 40px;
  text-align: center;
  line-height: 40px;
  color: #29fcff;
  font-size: 20px;
  flex: 1;
  background-size: 100% 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top {
  width: 100%;
  height: 100%;
  display: flex;

  .left {
    @include extendcss;
    background: url(@/views/screen/images/dataScreen-header-left-bg.png) no-repeat;

    .lbtn {
      width: 30%;
      height: 40px;
      background: url(@/views/screen/images/dataScreen-header-btn-bg-l.png) no-repeat;
      cursor: pointer;
    }

    .code {
      width: 70%;
      height: 40px;
    }
  }

  .content {
    height: 100%;
    text-align: center;
    line-height: 75px;
    color: #29fcff;
    font-size: 40px;
    font-family: "宋体";
    flex: 2;
    background-color: blanchedalmond;
    background: url(@/views/screen/images/dataScreen-header-center-bg.png) no-repeat;
    background-size: 100% 75px;

    .title {
      width: 100%;
      height: 100%;
    }
  }

  .right {
    @include extendcss;
    background: url(@/views/screen/images/dataScreen-header-right-bg.png) no-repeat;

    .rbtn {
      width: 30%;
      height: 40px;
      background: url(@/views/screen/images/dataScreen-header-btn-bg-r.png) no-repeat;
      cursor: pointer;
    }

    .time {
      width: 70%;
      height: 40px;
      align-items: center;
    }
  }
}
</style>
